<?php

namespace api\wechat;

class package
{
    //获取今日自助餐信息
    public function getInfo($data){
        $openid=$data['openid'];
        $con=con();
        $today=date("Y-m-d");

        $info=mysqli_query($con,"select * from package where status=1 and is_delete=1 and date like '%$today%' order by `id` DESC");
        $info=mysqli_fetch_all($info,true);
        mysqli_close($con);
        for($i=0;$i<count($info);$i++){
            $info[$i]['price_first']=sprintf('%.2f',$info[$i]['price_first']/100);
            $info[$i]['price_1']=sprintf('%.2f',$info[$i]['price_1']/100);
            $info[$i]['price_2']=sprintf('%.2f',$info[$i]['price_2']/100);
            $info[$i]['price_3']=sprintf('%.2f',$info[$i]['price_3']/100);
            $info[$i]['create_time']=date("Y-m-d H:i:s",$info[$i]['create_time']);
            $info[$i]['update_time']=date("Y-m-d H:i:s",$info[$i]['update_time']);
        }
        return out_right($info);
    }

}